package com.xgkj.diyiketang.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xgkj.diyiketang.R;

public class MyzhanghuTwoActivity extends BaseActivity implements View.OnClickListener {
    private TextView leijishouyi,zongzichan,back;
    private RelativeLayout my_chongzhi_layout,my_tixian_layout,my_zhuanzeng_layout;
    private String zongzichan_inte;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_myzhanghu_two);
        initUI();
    }

    private void initUI() {
        back = (TextView) findViewById(R.id.zhuanyun_back);
        back.setOnClickListener(this);
        leijishouyi = (TextView) findViewById(R.id.leijishouyi);
        zongzichan = (TextView) findViewById(R.id.zongzichan);
        my_chongzhi_layout = (RelativeLayout) findViewById(R.id.my_chongzhi_layout);
        my_chongzhi_layout.setOnClickListener(this);
        my_tixian_layout = (RelativeLayout) findViewById(R.id.my_tixian_layout);
        my_tixian_layout.setOnClickListener(this);
        my_zhuanzeng_layout = (RelativeLayout) findViewById(R.id.my_zhuanzeng_layout);
        my_zhuanzeng_layout.setOnClickListener(this);
        Intent intent = getIntent();
        if (intent.getStringExtra("zongzochan")!=null){
            zongzichan_inte = intent.getStringExtra("zongzochan");
            zongzichan.setText(zongzichan_inte);
        }
        if (intent.getStringExtra("haveBindPay")!=null){

        }
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()){
            case R.id.my_chongzhi_layout:
                intent = new Intent(this,ChongzhiXuefenActivity.class);
                intent.putExtra("zongzochan",zongzichan_inte);
                startActivity(intent);
                break;
            case R.id.my_tixian_layout:
                intent = new Intent(this,TixianXuefenActivity.class);
                startActivity(intent);
                break;
            case R.id.my_zhuanzeng_layout:
                intent = new Intent(this,ChooseTransFriendFlower.class);
                startActivity(intent);
                break;
            case R.id.zhuanyun_back:
                finish();
                break;
        }
    }
}
